<script lang="ts" setup>
interface IProps {
  show: boolean
  clickMask: () => void
  children?: any
}
const {show,clickMask,children} = defineProps<IProps>()
</script>
<template>
  <div
    class="fixed top-0 left-0 right-0 bottom-0 bg-black z-10 bg-opacity-75"
    :class="show ? 'block' : 'hidden'"
    @click="clickMask"
  >
    <div
      class="absolute top-1/2 left-1/2 -translate-x-2/4 -translate-y-2/4"
      @click="(e) => e.stopPropagation()"
    >
      {{children}}
    </div>
  </div>
</template>

